package se.webbzon.boltzmann.editor.component.texturelist;

import java.util.Map.Entry;

import se.webbzon.oschi01.resourceset.ResourceSet;
import se.webbzon.oschi01.textureset.Texture3D;

public class TextureSetEntry implements Comparable<TextureSetEntry> {
	
	// The key to this texture entry
	private final String key;
	
	// The value of this texture entry
	private final ResourceSet<Texture3D> value;
	
	/*============================================================
	Constructors
	============================================================*/
	
	/** Creates a new texture set entry from the given entry. **/
	public TextureSetEntry(Entry<String,ResourceSet<Texture3D>> textureEntry) {
		key = textureEntry.getKey();
		value = textureEntry.getValue();
	}
	
	/*============================================================
	Public Methods
	============================================================*/
	
	/** Returns the name of the texture set associated with this entry. **/
	public String getTextureSetName() {
		return key;
	}
	
	/** Returns the texture set associated with this entry. **/
	public ResourceSet<Texture3D> getTextureSet() {
		return value;
	}

	@Override public int compareTo(TextureSetEntry other) {
		return key.compareTo(other.key);
	}
	
	

}
